<template>
  <div class="bottom-list">
    <div v-for="(item,index) in listarr"
         :key="index"
         v-bind="name">
      <div class="listitem"
           @click="gotolist(item.index)">
        {{item.name}}
        <span class="icon">
          <font-awesome-icon icon="chevron-right" />
        </span>
      </div>
    </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      name: '',
      listarr: [
        {
          name: '我的订单',
          index: 1
        },
        {
          name: '我的拼团',
          index: 2
        },
        {
          name: '我的账单',
          index: 3
        },
        {
          name: '我的快递',
          index: 4
        },
        {
          name: '我的访客',
          index: 5
        },
        {
          name: '我的电子发票',
          index: 6
        },
        {
          name: '我的互动',
          index: 7
        },
        {
          name: '我的房屋',
          index: 8
        }
      ]
    }
  },
  methods: {
    gotolist: function (id) {
      if (id === 1) {
        this.$router.push({ path: '/Myorder' })
      } else if (id === 2) {
        this.$router.push({ path: '/Mygroupby' })
      } else if (id === 3) {
        this.$router.push({ path: '/Mybill' })
      } else if (id === 4) {
        this.$router.push({ path: '/Mypost' })
      } else if (id === 5) {
        this.$router.push({ path: '/Myguest' })
      } else if (id === 6) {
        this.$router.push({ path: '/Myreceipt' })
      } else if (id === 7) {
        this.$router.push({ path: '/Myinteract' })
      } else if (id === 8) {
        this.$router.push({ path: '/Myhome' })
      }
    }
  }
}
</script>

<style scoped>
.bottom-list {
  padding-bottom: 1rem;
  color: #778899;
}
.listitem {
  position: relative;
  height: 5rem;
  line-height: 5rem;
  padding-left: 30px;
  border-bottom: rgba(128, 128, 128, 0.178) solid 1px;
}
.listitem svg {
  float: right;
  height: 100%;
  margin-right: 25px;
}
</style>
